import { settingConfig } from "@/config";
import { loadRoutes } from "@/utils";

export const staticRoutes = [
    {
        path: "/user",
        name: settingConfig.loginName,
        redirect: {
            name: "Login",
        },
        component: () => import("@/layout/loginLayout/loginLayout.vue"),
        children: loadRoutes(require.context("./login", false, /\.js$/)),
    },
    {
        path: "/kanban",
        name: settingConfig.kanBanName,
        meta: {
            notAuth: true
        },
        redirect: { name: 'KanbanHome' },
        component: () => import("@/layout/remLayout/remLayout.vue"),
        children: loadRoutes(require.context("./kanban", false, /\.js$/)),
    },
    {
        path: "/404",
        name: settingConfig.error404,
        meta: {
            title: "404",
            notAuth: true,
        },
        component: () => import("@/views/404/404.vue"),
    },
    {
        path: "/403",
        name: settingConfig.auth403Name,
        meta: {
            title: "403",
            notAuth: true,
        },
        component: () => import("@/views/403/403.vue"),
    },
    {
        path: "*",
        redirect: { name: settingConfig.error404 },
    },
];
